package com.multi_allergy;

import java.util.*;

public class Passenger {

	
	public Passenger(String name,String allergy,String allergy2) {
		super();
		Random random = new Random();
		this.name = name;
		this.selectedMenu=null;
		this.id=random.nextLong();
		this.allergies= new Vector<String>();
		
		allergies.add(allergy.toLowerCase());
		allergies.add(allergy2.toLowerCase());
	}
	
	private long id;
	
	
	
	private Collection <String> allergies;
	public Collection<String> getAllergies() {
		return this.allergies;
	}

	public void setAllergy(String allergy) {
		this.allergies.add(allergy.toLowerCase());
	}
	
	private AirplaneMenu selectedMenu;
	private String name;

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	
	public AirplaneMenu getSelectedMenu() {
		return this.selectedMenu;
	}
	public void setSelectedMenu(AirplaneMenu selectedMenu) {
		this.selectedMenu = selectedMenu;
	}
	
	public String toString()
	{
		String output="Passenger: "+name +"\n"+selectedMenu;
			
		return output;
	}

	public long getId() {
		return this.id;
	}
}
